#define   _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
int main()
{
	int i, sum = 0, n, x = 0, s;
	scanf("%d %d", &s, &n);
		for (i = 1; i <= n; i++)
		{
			x = x * 10 + s;
			sum += x;
		}
	printf("%d", sum);
	return 0;
}